﻿using System;
using System.Text;
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.Utility;
using MatrixS;
using suduku;
namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            suduku.sudoku su1 = new suduku.sudoku();
            MatrixS.MatrixS su = new MatrixS.MatrixS();
            //int[,] dd = new int[3, 3]{{1,1,1},{1,2,3},{2,1,2}};
            int[,] dd = new int[2, 3] { { 1, 1, 1 }, { 1, 2, 3 } };
            int nn = 2;
            //nn[0] = 4;

            MathWorks.MATLAB.NET.Arrays.MWNumericArray d = new MathWorks.MATLAB.NET.Arrays.MWNumericArray(dd);
            MathWorks.MATLAB.NET.Arrays.MWNumericArray n = (MathWorks.MATLAB.NET.Arrays.MWNumericArray)nn;
            MWArray S = su1.sudokux(n, d);
            double [,] SInt = (double[,])S.ToArray();
            for (int i = 0; i < SInt.GetLength(0); i++)
            {

                for (int j = 0; j < SInt.GetLength(1); j++)

                    Console.Write(SInt[i, j] + "\t");

                Console.WriteLine("");

            }  
        }
    }
}
